package com.bigshen.demo.annotation.injectioncomponents.a3resource;

import com.bigshen.demo.project.service.MyService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyTest {

    @Test
    public void test() {

        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);

        MyService myService = (MyService) applicationContext.getBean("myService");

        System.out.println(myService);

        System.out.println(myService.personService);

    }

}
